-
Notifications
You must be signed in to change notification settings - Fork 67
esp32s3: i2s: add PLL_D2 clock source #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp32s3: i2s: add PLL_D2 clock source #470
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are those the only places where adding PLL_D2
can be used? If there are others, would you mind extending your PR to include them please?
a0b92ec
to
14e5a9d
Compare
What do you mean with other places? Regarding I2S I think this covers it all. LCD_CAM: |
Yes, I meant the other subsystems and drivers. It seems only I2S was missing this option. |
|
||
/** | ||
* @brief I2S clock source enum | ||
*/ | ||
typedef enum { | ||
I2S_CLK_SRC_DEFAULT = SOC_MOD_CLK_PLL_F160M, /*!< Select PLL_F160M as the default source clock */ | ||
I2S_CLK_SRC_PLL_160M = SOC_MOD_CLK_PLL_F160M, /*!< Select PLL_F160M as the source clock */ | ||
I2S_CLK_SRC_PLL_D2 = SOC_MOD_CLK_PLL_D2, /*!< Select PLL_D2 as the source clock */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you change this to the below and move it before 160MHz entry?
I2S_CLK_SRC_PLL_240M = SOC_MOD_CLK_PLL_D2, /*!< Select PLL_D2 as the source clock.
It is default to 240MHz while PLL is 480MHz,
but it will be 160MHz if PLL is 320MHz */
@epc-ake Would you also apply the same change into /**
* @brief Array initializer for all supported clock sources of I2S
*/
- #define SOC_I2S_CLKS {SOC_MOD_CLK_PLL_F160M, SOC_MOD_CLK_XTAL, I2S_CLK_SRC_EXTERNAL}
+ #define SOC_I2S_CLKS {SOC_MOD_CLK_PLL_F240M, SOC_MOD_CLK_PLL_F160M, SOC_MOD_CLK_XTAL, I2S_CLK_SRC_EXTERNAL}
/**
* @brief I2S clock source enum
*/
typedef enum {
I2S_CLK_SRC_DEFAULT = SOC_MOD_CLK_PLL_F160M, /*!< Select PLL_F160M as the default source clock */
+ I2S_CLK_SRC_PLL_240M = SOC_MOD_CLK_PLL_F240M, /*!< Select PLL_F240M as the source clock */
I2S_CLK_SRC_PLL_160M = SOC_MOD_CLK_PLL_F160M, /*!< Select PLL_F160M as the source clock */
I2S_CLK_SRC_XTAL = SOC_MOD_CLK_XTAL, /*!< Select XTAL as the source clock */
I2S_CLK_SRC_EXTERNAL = -1, /*!< Select external clock as source clock */
} soc_periph_i2s_clk_src_t; Let me know if you can do it. Otherwise we merge this and submit another. Thanks! |
Add the option to add PLL_D2 clock source for tx/rx clk of the i2s periphery of the esp32s3. Signed-off-by: Armin Kessler <[email protected]>
14e5a9d
to
4b3f2b1
Compare
Add the option to add PLL_F240M clock source for tx/rx clk of the i2s periphery of the esp32c6. Signed-off-by: Armin Kessler [email protected]
I added it as a second commit but I cant test it here. |
Thanks! |
Add the option to add PLL_D2 clock source for tx/rx clk of the i2s periphery of the esp32s3.